#include "mainwindow.h"
#include "ui_mainwindow.h"

MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
{
    setupUi(this);

    gameboard = new board_gui;
    connect(gameboard, SIGNAL(squareClicked(int,int)), this, SLOT(testPrint(int, int)));
    connect(acceptMove, SIGNAL(clicked()), gameboard, SLOT(test()));
}

MainWindow::~MainWindow()
{
    delete gameboard;
}

void MainWindow::on_actionStart_new_game_triggered()
{
    qDebug() << "board connected to game " << endl;
}

void MainWindow::on_actionExit_triggered()
{
    close();
}

void MainWindow::testPrint(int x, int y)
{
    qDebug() << "work please";
    //test();
}

void MainWindow::test()
{
    qDebug() << " ooooubowob" << endl;
}
